import request from '/@/utils/request';

export function getDatabases(query: Object) {
    return request({
        url: '/api/v1/system/db/list',
        method: 'get',
        params: query
    })
}

export function getMysqlTables(query: Object) {
    return request({
        url: '/api/v1/system/mysql/tables',
        method: 'get',
        params: query
    })
}

export function getMysqlTableDesc(query: Object) {
    return request({
        url: '/api/v1/system/mysql/table/desc',
        method: 'get',
        params: query
    })
}

export function optimizeMysqlTable(data: any) {
    return request({
        url: '/api/v1/system/mysql/table/optimize',
        method: 'post',
        data: data
    })
}


